import { post, get } from '@/request/http'

// 查询组织树状图数据
export function queryOrgTree (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/queryOrgTree'
  return post(url, data)
}

// 分页查询组织列表数据
export function queryOrgListByPage (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/getPageHnOrganization'
  return post(url, data)
}

// 新增组织机构
export function addOrg (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/insertSelective'
  return post(url, data)
}

// 删除组织机构
export function delOrg (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/deleteByPrimaryKey'
  return post(url, data)
}

// 查询组织机构详情
export function getOrganizationById (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/getHnOrganizationById'
  return get(url, data)
}

// 修改组织机构
export function updateOrg (data) {
  const url = process.env.VUE_APP_CDHNTECH_API + '/hnOrganization/updateByPrimaryKeySelective'
  return post(url, data)
}
